#include <bits/stdc++.h>
using namespace std;

double power( double a, int n){
    if(n < 0) return 1/power(a,-n);
    else {
        double p = 1;
        while(n-- > 0){
            p = p*a;
        }
        return p;
    }
}

int main()
{
    cout << "Problem B :" << endl;
    double UF = power(2,-1);
    double OF = power(2,1)*(2-power(2,1-3));
    cout << "UFL= " << UF << endl;
    cout << "OFL= " << OF << endl;

    vector<double> m1,m2;
    m1.push_back(0);
    for (int i=-1; i<=1; i++){
	for (int j = 0; j<=3; j++){
	    double v = (1.0+0.25*j)*power(2,i);
	    m1.push_back(v);
	    m1.push_back(-v);
	}
    }
    cout << "Cardinality: " << m1.size() << endl;
    sort(m1.begin(),m1.end());
    for (auto p : m1) {cout << p << " ";}
    cout << endl;

    for (int i=1; i<=3; i++){
	double v = 0.25*i*pow(2,-1);
	m2.push_back(v);
	m2.push_back(-v);
    }
    cout << "Additional Cardinality " << m2.size() << endl;
    sort(m2.begin(),m2.end());
    for (auto p : m2) {cout << p << " ";}
    cout << endl;

    return 0;
}